﻿@{
    ViewBag.Title = Local("SiteDomain.HostView.Title");
}

@model IEnumerable<SiteDomain>

<div class="box">
    <table cellpadding="0" cellspacing="0">
        <thead>
            <tr>
                <td>@Local("SiteDomain.Domain")</td>
                <td>@Local("SiteDomain.Enabled")</td>
                <td>@Local("SiteDomain.IsDefault")</td>
                <td>@Local("SiteDomain.SettingsID")</td>
                <td class="action">@Local("SiteDomain.Action")</td>
            </tr>
        </thead>
        <tbody class="hoverline">
        @foreach (var site in Model)
        { 
            <tr>
                <td>@site.Domain</td>
                <td>@CPHelper.ShowBoolean(site.Enabled)</td>
                <td>@CPHelper.ShowBoolean(site.IsDefault)</td>
                <td>@site.SettingsID</td>
                <td class="action">
                    <a href="javascript:void(0);" onclick="return openModal('@CUrls.DialogHostView?id=@site.SiteID', 400);">@Local("SiteDomain.ActionEdit")</a> 
                    @Html.AjaxLink(HttpAction.Delete, "Delete", new{id=site.SiteID})
                </td>
            </tr>
        }
        </tbody>
    </table>
</div>

<div class="box">
    <button onclick="return openModal('@CUrls.DialogHostView', 400);"> @Local("SiteDomain.NewSite") </button>
</div>
